package com.bmd.backgroundmanger.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

/**
 * 用户答题记录实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("user_answers")
@Schema(name = "UserAnswer", description = "用户答题记录实体类")
public class UserAnswer implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "答案ID")
    @TableId(value = "answer_id", type = IdType.AUTO)
    private Integer answerId;

    @Schema(description = "用户ID")
    private Integer userId;

    @Schema(description = "题目ID")
    private Integer questionId;

    @Schema(description = "用户答案")
    private String answerContent;

    @Schema(description = "答案是否正确")
    private Boolean isCorrect;

    @Schema(description = "得分")
    private Integer score;

    @Schema(description = "答题用时(秒)")
    private Integer answerTime;

    @Schema(description = "试卷ID")
    private Integer paperId;

    @Schema(description = "提交时间")
    private LocalDateTime submitTime;

    @Schema(description = "创建人")
    private Integer createBy;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "修改人")
    private Integer updateBy;

    @Schema(description = "修改时间")
    private LocalDateTime updateTime;

    @Schema(description = "关联的题目信息")
    @TableField(exist = false)
    private Question question;
} 